﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Site_IEQ.IEQ_DAL;

namespace Site_IEQ.Masters
{
    public partial class MasterPage : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            lblLogin.Visible = false;
        }

        protected void btnOk_Click(object sender, EventArgs e)
        {
            IEQ_Login login = new IEQ_Login();
            if (login.ExecuteLogin(tbUsuario.Text, tbSenha.Text))
            {
                
                Response.Redirect(String.Format("\\areainterna\\cadastro_conteudo.aspx?GrupoDepto={0}",tbUsuario.Text));
            }
            else
            {
                lblLogin.Visible = true;
            }

            
        }
    }
}